<template>
  <div>
    <div>
      <van-cell title="修改密码" is-link to="/user/changepsw" />
      <van-cell title="重置密码" is-link to="/user/resetpsw" />
      <van-cell title="关于" is-link @click.native="handleAbout" />

      <van-button type="primary" @click.native="handleLogout">
        退出登录
      </van-button>

      <div>
        <!-- {{ partner }} -->
      </div>
    </div>
  </div>
</template>

<script>
import { Dialog } from 'vant'

export default {
  name: 'MeConsultant',
  components: {},
  directives: {},
  filters: {},
  // mixins: [],
  props: {},

  data() {
    return {}
  },
  computed: {},
  async created() {},

  methods: {
    handleChangePsw() {
      console.log('xxx, click handleChangePsw,')
    },
    handleAbout() {
      console.log('xxx, click  about,')
      Dialog.alert({
        title: '关于',
        message: 'odoo mobile, 2020-6-20'
      }).then(() => {
        // on close
      })
    },
    async handleLogout() {
      console.log('xxx,handleLogout')
      await this.$store.dispatch('user/logout')
      console.log('xxx,handleLogout 2')
      this.$router.push('/login')
    }
  }
}
</script>

<style type="text/css"></style>
